package com.wander.designStructural.adapter.objectAdapter;

/**
 * @Author : WDYin
 * @Date : 2020/12/10
 * @Desc : 适配器类，适配器实现目标类，
 */
public class ObjectAdapter implements ObjectTarget{

    private ObjectAdaptee objectAdaptee;

    public ObjectAdapter(ObjectAdaptee objectAdaptee) {
        this.objectAdaptee = objectAdaptee;
    }

    @Override
    public void socket2() {
        int i = objectAdaptee.socket3() - 1;
        System.out.println("插座适配器开始工作，"+i+"头插座");
    }
}
